class AssignmentPositionStandard < Mutations::Command
  include Wisper::Publisher
  
  required do
    string :organization_id
  end

  optional do
    array :requre_certificate_organs, default: []
  end
    
  def execute

    unless organization = Organization.find(organization_id)
      add_error(:organization_id, :organization_id, '组织机构不存在') 
      return
    end

    Organization.update_requre_certificate_organ organization, requre_certificate_organs
  end

end